import { createApp } from 'vue'

import App from './App.vue'
// 引入element-plus插件
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
// 注册element-plus所有图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
//@ts-ignore
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
// svg引入
import 'virtual:svg-icons-register'
import allGloablComponent from '@/components/index.ts'
// 引入模版的全局样式
import '@/styles/index.scss'
const app = createApp(App)
//路由配置
import router from '@/router/index'
//pinia状态库配置
import pinia from '@/stores/index.ts'
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
app.use(ElementPlus, {
  locale: zhCn,
  // 配置element-plus国际化
})
app.use(router)
app.use(pinia)
// 注册全局svg组件
app.use(allGloablComponent)
// app.use(ElementPlus)
app.mount('#app')
